<template>
  <div>
    <div>{{ str }}</div>
    <div @click="reverseStr">逆转</div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      str: 'hello,world',
    }
  },
  methods: {
    reverseStr() {
      this.str = this.str.split('').reverse().join('')
    },
  },
}
</script>

<style scoped></style>
